import axios from "../model/axios";
import api from "../model/api";

export const  userRegister = (data:any)=>{
    return  axios({
        method:"post",
        url:api.mine.register,
        data
    })
}
export const  userLogin = (data:any)=>{
    return  axios({
        method:"post",
        url:api.mine.login,
        data
    })
}
export  const  getInfo  = ()=>{
    return axios({
        method:"get",
        url:api.mine.getInfo,
        headers:{
            "Authorization":window.localStorage.getItem("token")
        }

    })
}
export  const  userEdit  = (data:any)=>{
    return axios({
        method:"put",
        url:api.mine.editUser,
        headers:{
            "Authorization":window.localStorage.getItem("token")
        },
        data
    })
}


